From 73b8ed17fed2145b29bde40a0c658712e34d48c3 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Tue, 28 Feb 2023 01:59:26 +0100
Subject: [PATCH] clang: default to -fno-semantic-interposition on supported
 targets

---
 clang/lib/Driver/ToolChains/Clang.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 3704ed85..d3d67a22 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5072,9 +5072,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       // The supported targets need to call AsmPrinter::getSymbolPreferLocal.
       bool SupportsLocalAlias =
           Triple.isAArch64() || Triple.isRISCV() || Triple.isX86();
-      if (!A)
-        CmdArgs.push_back("-fhalf-no-semantic-interposition");
-      else if (A->getOption().matches(options::OPT_fsemantic_interposition))
+      if (A && A->getOption().matches(options::OPT_fsemantic_interposition))
         A->render(Args, CmdArgs);
       else if (!SupportsLocalAlias)
         CmdArgs.push_back("-fhalf-no-semantic-interposition");
-- 
2.39.0

